Temperature sensor and modulation circuit for voltage to duty-cycle conversion of the same

ABSTRACT

A modulation circuit for voltage to duty-cycle conversion is provided. A first input end and a second input end of a comparator are supplied with a first voltage and a second voltage via a first switch and a second switch respectively. An output end of the comparator outputs a comparison result signal. A charging end of a charging capacitor is connected with a charging current source and a grounding reset module, and is connected with the first input end via a third switch, and is connected with the second input end via a fourth switch. When the comparison result signal flips over, a control module controls the grounding reset module to switch an on-off state of a first switch group including the first switch and the fourth switch and a second switch group including the second switch and the third switch.

FIELD

The present disclosure relates to the technical field ofmicroelectronics, in particular to a temperature sensor and a modulationcircuit for voltage to duty-cycle conversion of the temperature sensor.

BACKGROUND

Complementary Metal Oxide Semiconductor (CMOS) temperature sensors havebeen widely used, for example, the CMOS temperature sensor may be usedin a Real Time Clock (RTC) clock generation circuit in a System on Chip(SoC). In a conventional CMOS temperature sensor, bipolar transistorsare used as temperature sensing devices in an analog front-end circuit,which generates an electrical signal that is positively correlated withtemperature, and a quantized high accuracy temperature value isoutputted by a high accuracy Analog-to-Digital Converter (ADC). As aresult, such high accuracy ADC increases the design complexity and thecost of the conventional CMOS temperature sensor. Recently, atemperature detection scheme based on duty-cycle-modulated output hasbeen proposed in the conventional technology. In the temperaturedetection scheme based on duty-cycle-modulated output, a comparator isused to compare a charging voltage of a capacitor with a temperaturecorrelated voltage, thereby outputting a square wave signal with aduty-cycle related to temperature. However, in the existing scheme, twocapacitors are generally used, a charging voltage of one capacitor iscompared with a voltage positively correlated with temperature, and acharging voltage of the other capacitor is compared with a voltagenegatively correlated with temperature, therefore a chip area in thecircuit is large, and a matching degree of two capacitance values of thetwo capacitors also affects an overall detection accuracy. In view ofthis, it is an urgent need for those skilled in the art to provide ascheme to solve the above technical problems.

SUMMARY

A temperature sensor and a modulation circuit for voltage to duty-cycleconversion of the temperature sensor are provided in the presentdisclosure to effectively reduce the chip area in the circuit and ensurethe detection accuracy.

In order to solve the above technical problem, in a first aspect, amodulation circuit for voltage to duty-cycle conversion is providedaccording to the disclosure. The modulation circuit includes: acomparison module including a comparator; a charging module including acharging capacitor and a charging current source; a grounding resetmodule; a switch module including a first switch, a second switch, athird switch and a fourth switch; and a control module.

A first input end of the comparator is connected with a first end of thefirst switch, a second end of the first switch is supplied with a firstvoltage. A second input end of the comparator is connected with a firstend of the second switch, a second end of the second switch is suppliedwith a second voltage. An output end of the comparator serves as anoutput end of the modulation circuit, the output end of the comparatoris configured to output a comparison result signal. A charging end ofthe charging capacitor is connected with the charging current source andthe grounding reset module. The charging end of the charging capacitoris connected with the first input end of the comparator via the thirdswitch. The charging end of the charging capacitor is connected with thesecond input end of the comparator via the fourth switch.

The control module is configured to, when the comparison result signalflips over, control the grounding reset module to operate to make thecharging capacitor be connected to ground and be reset, and switch anon-off state of a first switch group and an on-off state of a secondswitch group. The first switch group includes the first switch and thefourth switch. The second switch group includes the second switch andthe third switch.

In an embodiment, the first input end of the comparator is anon-inverting input end, and the second input end of the comparator isan inverting input end. The control module is configured to control theon-off state of the first switch group according to the comparisonresult signal, and control the on-off state of the second switch groupaccording to an inverting signal of the comparison result signal.

In a second aspect, a temperature sensor is provided according to thedisclosure. The temperature sensor includes a temperature correlatedvoltage generating circuit and the modulation circuit for voltage toduty-cycle conversion described above. The temperature correlatedvoltage generating circuit includes: a first voltage module configuredto output the first voltage; and a second voltage module configured tooutput the second voltage. The first voltage is positively correlatedwith temperature, the second voltage is negatively correlated withtemperature. The control module is further configured to generate atemperature detection signal according to a duty-cycle of the comparisonresult signal and output the temperature detection signal.

In an embodiment, the control module is configured to generate atemperature detection signal μ according to

$\mu = \frac{kD}{{kD} + 1 - D}$and output the temperature detection signal. D is the duty-cycle of thecomparison result signal, and k is an adjustment parameter.

In an embodiment, the first voltage module includes a first Proportionalto Absolute Temperature (PTAT) current source and a bias resistorconnected in series. The first voltage is a voltage across two ends ofthe bias resistor. The second voltage module includes a second PTATcurrent source and a bias bipolar junction transistor connected inseries. The second voltage is a base-emitter voltage of the bias bipolarjunction transistor. The temperature correlated voltage generatingcircuit further includes a PTAT current generating circuit configured toprovide a first PTAT current for the first PTAT current source andprovide a second PTAT current for the second PTAT current source.

In an embodiment, the first PTAT current source is connected with afirst end of the bias resistor and the second end of the first switch,and a second end of the bias resistor is connected to ground. The secondPTAT current source is connected with an emitter of the bias bipolarjunction transistor and the second end of the second switch, and a baseand a collector of the bias bipolar junction transistor are connected toground.

In an embodiment, the first PTAT current source is connected with thefirst end of the first switch, a first end of the bias resistor isconnected with the second end of the first switch, and a second end ofthe bias resistor is connected to ground.

The second PTAT current source is connected with the first end of thesecond switch, an emitter of the bias bipolar junction transistor isconnected with the second end of the second switch, and a base and acollector of the bias bipolar junction transistor is connected toground.

The charging current source includes a first charging current source anda second charging current source. The first PTAT current source servesas the first charging current source to charge the charging capacitorwhen the third switch is turned on. The second PTAT current sourceserves as the second charging current source to charge the chargingcapacitor when the fourth switch is turned on. The first PTAT current isequal to the second PTAT current.

In an embodiment, the first voltage module further includes a third PTATcurrent source connected with the second end of the first switch.

In an embodiment, the second voltage module further includes acompensation bipolar junction transistor and a compensation currentsource. The compensation current source is connected with an emitter ofthe compensation bipolar junction transistor. A collector of thecompensation bipolar junction transistor is connected to ground. A baseof the compensation bipolar junction transistor is connected with theemitter of the bias bipolar junction transistor. The compensationbipolar junction transistor is configured to perform gain compensationon the bias bipolar junction transistor.

In an embodiment, the PTAT current generating circuit includes a currentmirror module, an operational amplifier, a first resistor, a firstpredetermined number of first transistors, and a second predeterminednumber of second transistors.

A first end of the first resistor is connected with a non-invertinginput end of the operational amplifier and is configured to receive afirst mirror current outputted from the current mirror module. A secondend of the first resistor is connected with an emitter of each of thefirst transistors.

An emitter of each of the second transistors is connected with aninverting input end of the operational amplifier and is configured toreceive a second mirror current outputted from the current mirrormodule. A base and a collector of each of the first transistors areconnected to ground. A base and a collector of each of the secondtransistors are connected to ground. The current mirror module isconfigured to provide the first PTAT current and the second PTATcurrent.

In an embodiment, the comparison module further includes a first chopperconfigured to chop an input signal of the comparator, and a secondchopper configured to chop an output signal of the comparator. The PTATcurrent generating circuit further includes a third chopper configuredto chop an input signal of the operational amplifier, and a fourthchopper configured to chop an output signal of the operationalamplifier. The control module is further configured to generate achopping control clock signal according to the comparison result signaland output the chopping control clock signal to the first chopper, thesecond chopper, the third chopper and the fourth chopper.

In an embodiment, the PTAT current generating circuit further includes asecond switching switch group connected with the current mirror moduleand a first switching switch group. The second end of the first resistoris connected with the emitters of the first transistors via the firstswitching switch group. The inverting input end of the operationalamplifier is connected with the emitters of the second transistors viathe first switching switch group.

The control module is further configured to generate a dynamic elementmatching (DEM) control clock signal according to the comparison resultsignal and output the DEM control clock signal to the first switchingswitch group and the second switching switch group, to perform dynamicelement matching control on the first transistors, the secondtransistors and the current mirror module.

The modulation circuit for voltage to duty-cycle conversion according tothe disclosure includes: a comparison module, a charging module, agrounding reset module, a switch module and a control module. Thecomparison module includes a comparator. The switch module includes afirst switch, a second switch, a third switch and a fourth switch. Afirst input end of the comparator is connected with a first end of thefirst switch, a second end of the first switch is supplied with a firstvoltage. A second input end of the comparator is connected with a firstend of the second switch, a second end of the second switch is suppliedwith a second voltage. An output end of the comparator serves as anoutput end of the modulation circuit, the output end of the comparatoris configured to output a comparison result signal. The charging moduleincludes a charging capacitor and a charging current source. A chargingend of the charging capacitor is connected with the charging currentsource and the grounding reset module. The charging end of the chargingcapacitor is connected with the first input end of the comparator viathe third switch. The charging end of the charging capacitor isconnected with the second input end of the comparator via the fourthswitch. The control module is configured to, when the comparison resultsignal flips over, control the grounding reset module to operate to makethe charging capacitor be connected to ground and be reset, and switchan on-off state of a first switch group and an on-off state of a secondswitch group. The first switch group includes the first switch and thefourth switch. The second switch group includes the second switch andthe third switch.

It can be seen that, in the present disclosure, the charging end of thecharging capacitor is connected with the non-inverting input end and theinverting input end of the comparison module via two switchesrespectively. With a reasonable switch control, the capacitor voltage ofthe charging capacitor can be compared with different voltage indifferent comparison phases, thereby realizing the reuse of the samecharging capacitor in different comparison phases, and reducing thenumber of used charging capacitors and the chip area, and saving productcost and circuit layout space. Moreover, in this disclosure, inaccuratedetection, caused by the mismatch of capacitance values of twocapacitors when two charging capacitors are used, is effectivelyavoided, thereby improving the detection accuracy. Further, in thedisclosure, there is no strict requirement of the capacitance value ofthe used capacitor, a Metal Oxide Semiconductor (MOS) capacitor with alarger capacitance density may be used, thereby further reducing thechip area. The temperature sensor provided in the present disclosureincludes the above-mentioned modulation circuit for voltage toduty-cycle conversion, therefore, the temperature sensor also has theabove advantageous effects.

BRIEF DESCRIPTION OF THE DRAWING

In order to describe technical solutions of embodiments in the presentdisclosure and of the conventional technology more clearly, drawingsrequired in the description of the conventional technology and theembodiments of the present disclosure are introduced simply as follows.Certainly, the following drawings of the embodiments of the disclosureshow only partial embodiments of the present disclosure, and thoseskilled in the art can obtain other drawings in accordance with theprovided drawings without any creative work, the obtained other drawingsare also fall into the scope of protection of the present disclosure.

FIG. 1 is a circuit structural diagram of a modulation circuit forvoltage to duty-cycle conversion according to an embodiment of thepresent disclosure;

FIG. 2 is an operation waveform diagram of the modulation circuit forvoltage to duty-cycle conversion shown in FIG. 1;

FIG. 3 is a circuit structural diagram of a temperature sensor accordingto an embodiment of the present disclosure;

FIG. 4 is a circuit structural diagram of a temperature sensor accordingto another embodiment of the present disclosure;

FIG. 5 is a circuit structural diagram of a temperature sensor accordingto another embodiment of the present disclosure; and

FIG. 6 is a circuit structural diagram of a temperature sensor accordingto another embodiment of the present disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

A temperature sensor and a modulation circuit for voltage to duty-cycleconversion of the temperature sensor are provided according to thepresent disclosure, to effectively reduce the chip area in the circuitand ensure the detection accuracy. For a more clear and completedescription of the technical solutions in the embodiments of the presentdisclosure, the technical solutions in the embodiments of the presentdisclosure will be described below in accordance with the drawings inthe embodiments of the present disclosure. Apparently, the describedembodiments are only a portion of rather than all of the embodiments ofthe present disclosure. All the other embodiments obtained by thoseskilled in the art based on the embodiments in the present disclosurewithout any creative work fall into the protection scope of the presentdisclosure.

A modulation circuit for voltage to duty-cycle conversion is provided inthe embodiment of the present disclosure. Referring to FIG. 1, themodulation circuit includes a comparison module 1, a charging module 2,a grounding reset module 3, a switch module 4, and a control module 5.The comparison module 1 includes a comparator G. The switch module 4includes a first switch K1, a second switch K2, a third switch K3 and afourth switch K4.

A first input end of the comparator G is connected with a first end ofthe first switch K1, a second end of the first switch K1 is suppliedwith a first voltage. A second input end of the comparator G isconnected with a first end of the second switch K2, a second end of thesecond switch K2 is supplied with a second voltage. An output end of thecomparator G serves as an output end of the modulation circuit, theoutput end of the comparator G is configured to output a comparisonresult signal. The charging module 2 includes a charging capacitor C anda charging current source. A charging end of the charging capacitor C isconnected with the charging current source and the grounding resetmodule 3. The charging end of the charging capacitor C is connected withthe first input end of the comparator G via the third switch K3. Thecharging end of the charging capacitor C is connected with the secondinput end of the comparator G via the fourth switch K4.

The control module 5 is configured to, when the comparison result signalflips over, control the grounding reset module 3 to operate to make thecharging capacitor C be connected to ground and be reset, and switch anon-off state of a first switch group and an on-off state of a secondswitch group. The first switch group includes the first switch K1 andthe fourth switch K4, and the second switch group includes the secondswitch K2 and the third switch K3.

In the modulation circuit for voltage to duty-cycle conversion accordingto the present disclosure, a charging process of a capacitor and switchcontrol are used to achieve modulated output of two input voltages, thatis, a first voltage and a second voltage, in a duty-cycle manner. Thecharging end of the charging capacitor C is connected with the chargingcurrent source, the voltage of the charging end increases during thecharging process. By switching on-off states of different switch groups,the voltage of the charging end can be repeatedly compared with thefirst voltage and the second voltage, respectively, thereby obtaining aperiodic comparison result signal having a certain duty-cycle.

In an embodiment, referring to FIG. 1, the first input end of thecomparator G is a non-inverting input end, and the second input end ofthe comparator G is an inverting input end. The control module 5 isconfigured to control the on-off state of the first switch groupaccording to the comparison result signal, and control the on-off stateof the second switch group according to an inverting signal of thecomparison result signal. In FIG. 1, Φ is the comparison result signaloutputted from the comparator G, Φ is an inverting signal of thecomparison result signal.

It should be noted that, similar to FIG. 1, those skilled in the art canalso obtain a following alternative solution. The first input end of thecomparator G is an inverting input end, the second input end of thecomparator G is a non-inverting input end, the control module 5 isconfigured to control the on-off state of the second switch groupaccording to the comparison result signal, and control the on-off stateof the first switch group according to the inverting signal of thecomparison result signal. The alternative solution also falls into theprotection scope of the present disclosure.

The operation process of the modulation circuit for voltage toduty-cycle conversion provided in the present disclosure is described bytaking the modulated circuit shown in FIG. 1 as an example. Theoperation process includes following two phases.

In a first phase, the control module 5 controls the first switch K1 andthe fourth switch K4 to be turned on, the non-inverting input end of thecomparator G is supplied with the first voltage U1 via the first switchK1, the inverting input end of the comparator G is connected with thecharging capacitor C via the fourth switch K4. In this case, the voltageof the non-inverting input end of the comparator G is the first voltageU1, and the voltage of the inverting input end of the comparator G isthe capacitor voltage Vc of the charging capacitor. At the initialcharging time, the control module 5 controls the grounding reset module3 to operate to make the charging capacitor C be connected to ground andbe reset, and Vc=0. During the charging process, the capacitor voltageVc increases from 0 continuously. As long as the capacitor voltage Vc ofthe inverting input end is less than the first voltage U1 of thenon-inverting input end, the comparison result signal outputted from thecomparator G is always a high level, the first switch K1 and the fourthswitch K4 remain in a turn-on state. Once the capacitor voltage Vc isgreater than the first voltage U1, the comparison result signaloutputted from the comparator G flips over, that is, the comparisonresult signal becomes a low level, then the first switch K1 and thefourth switch K4 are turned off.

The control module 5 controls the on-off state of the second switch K2and the third switch K3 according to an inverting signal of thecomparison result signal outputted from the comparator G. When thecomparison result signal becomes a low level, the second switch K2 andthe third switch K3 are turned on, that is, a second phase is entered.At this time, the inverting input end of the comparator G is suppliedwith the second voltage U2 via the second switch K2, and thenon-inverting input end of the comparator G is connected with thecharging capacitor C via the third switch K3. In this case, the voltageof the inverting input end of the comparator G is the second voltage U2,and the voltage of the non-inverting input end of the comparator G isthe capacitor voltage Vc. When the comparison result signal changes fromthe high level to the low level, the control module 5 controls thegrounding reset module 3 to operate, the charging capacitor C isconnected to ground and reset, and the capacitor voltage is becomesVc=0. Then, as the charging capacitor C is charged continuously, thecapacitor voltage Vc increases from 0 continuously. As long as thecapacitor voltage Vc of the non-inverting input end is less than thesecond voltage U2 of the inverting input end, the comparison resultsignal outputted from the comparator G is always a low level, the secondswitch K2 and the third switch K3 remain in a turn-on state. Once thecapacitor voltage Vc is greater than the second voltage U2, thecomparison result signal outputted from the comparator G flips over,that is, the comparison result signal becomes a high level, and thesecond switch K2 and the third switch K3 are turned off, that is, thefirst phase, in which the first switch K1 and the fourth switch K4 areturned on, is entered.

The grounding reset module 3 may be a normally open grounding switch S.The control module 5 controls the grounding switch S to be turned onquickly and then to be turned off, to complete the grounding and resetof the charging capacitor C, when the comparison result signal outputtedfrom the comparator G flips over.

It can be seen from the above content that, a duration t1 of the firstphase is actually the charging duration required for the capacitorvoltage Vc to be charged from 0 to the first voltage U1, and theduration t2 of the second phase is actually the charging durationrequired for the capacitor voltage Vc to be charged from 0 to the secondvoltage U2. Referring to FIG. 2, FIG. 2 is an operation waveform diagramof the modulation circuit for voltage to duty-cycle conversion accordingto the present disclosure. In FIG. 2, CLK is a clock pulse signal of thecontrol module 5, V₊ is the voltage of the non-inverting input end ofthe comparator G, V⁻ is the voltage of the inverting input end of thecomparator G; Φ is the comparison result signal.U1/(U1+U2)=t1/(t1+t2)=D, D is the duty-cycle of the comparison resultsignal outputted from the comparator G.

It can be seen from the above two phases of the operation process andFIG. 1 that, the modulation circuit for voltage to duty-cycle conversionprovided in the present disclosure realizes reuse of the chargingcapacitor, therefore only one charging capacitor C is needed.Specifically, the same charging capacitor C can be charged in the firstphase and the second phase to complete modulation for voltage toduty-cycle conversion by reasonably switching the on-off state of thefirst switch group and the on-off state of the second switch group.

The modulation circuit for voltage to duty-cycle conversion according tothe present disclosure includes a comparison module 1, a charging module2, a grounding reset module 3, a switch module 4, and a control module5. The comparison module 1 includes a comparator G. The switch module 4includes a first switch K1, a second switch K2, a third switch K3 and afourth switch K4. A first input end of the comparator G is connectedwith a first end of the first switch K1, a second end of the firstswitch K1 is supplied with a first voltage. A second input end of thecomparator G is connected with a first end of the second switch K2, asecond end of the second switch K2 is supplied with a second voltage. Anoutput end of the comparator G serves as an output end of the modulationcircuit, the output end of the comparator G is configured to output acomparison result signal. The charging module 2 includes a chargingcapacitor C and a charging current source. A charging end of thecharging capacitor C is connected with the charging current source andthe grounding reset module 3. The charging end of the charging capacitorC is connected with the first input end of the comparator G via thethird switch K3. The charging end of the charging capacitor C isconnected with the second input end of the comparator G via the fourthswitch K4. The control module 5 is configured to, when the comparisonresult signal flips over, control the grounding reset module 3 tooperate to make the charging capacitor C be connected to ground and bereset, and switch an on-off state of a first switch group and an on-offstate of a second switch group. The first switch group includes thefirst switch K1 and the fourth switch K4, and the second switch groupincludes the second switch K2 and the third switch K3.

It can be seen that, in the present disclosure, the charging end of thecharging capacitor C is connected with two input ends of the comparisonmodule 1 via two switches respectively. With a reasonable switchcontrol, the capacitor voltage Vc of the charging capacitor C can becompared with different voltage in different comparison phases, therebyrealizing the reuse of the same charging capacitor in differentcomparison phases, and reducing the number of used charging capacitorsand the chip area, and saving product cost and circuit layout space.Moreover, in this disclosure, inaccurate detection, caused by themismatch of capacitance values of two capacitors when two chargingcapacitors are used, is effectively avoided, thereby improving thedetection accuracy. Further, in the disclosure, only one chargingcapacitor is used, there is no strict requirement of the capacitancevalue of the used capacitor, a Metal Oxide Semiconductor (MOS) capacitorwith a larger capacitance density may be used, thereby further reducingthe chip area.

In addition, the modulation circuit for voltage to duty-cycle conversionprovided in the present disclosure is implemented based on thecomparator G without using an operational amplifier with relatively highpower consumption, thereby effectively reducing circuit powerconsumption.

The temperature sensor provided in the present disclosure is describedbelow.

The temperature sensor provided in the present disclosure includes atemperature correlated voltage generating circuit and the modulationcircuit for voltage to duty-cycle conversion according to any one of theabove embodiments. The temperature correlated voltage generating circuitincludes: a first voltage module configured to output the first voltageU1; and a second voltage module configured to output the second voltageU2. The first voltage U1 is positively correlated with temperature, thesecond voltage U2 is negatively correlated with temperature. The controlmodule 5 is further configured to generate a temperature detectionsignal according to a duty-cycle of the comparison result signal andoutput the temperature detection signal.

In an embodiment, the modulation circuit for voltage to duty-cycleconversion described above is applied to temperature detection. Thefirst voltage U1 outputted from the first voltage module is positivelycorrelated with temperature. The second voltage U2 outputted from thesecond voltage module is negatively correlated with temperature.Therefore, the ratio U1/(U1+U2) is also correlated with temperature andcan reflect temperature information. Therefore, the temperaturedetection can be achieved in the present disclosure by using theduty-cycle D of the comparison result signal outputted from thecomparator G.

It can be seen that, in the temperature sensor according to the presentdisclosure, the charging end of the charging capacitor C is connectedwith two input ends of the comparison module 1 via two switchesrespectively. With a reasonable switch control, the capacitor voltage Vcof the charging capacitor C can be compared with different voltage indifferent comparison phases, thereby realizing the reuse of the samecharging capacitor in different comparison phases, and reducing thenumber of used charging capacitors and the chip area, and saving productcost and circuit layout space. Moreover, in this disclosure, inaccuratedetection, caused by the mismatch of capacitance values of twocapacitors when two charging capacitors are used, is effectivelyavoided, thereby improving the detection accuracy. Further, in thedisclosure, only one charging capacitor is used, there is no strictrequirement of the capacitance value of the used capacitor, a MetalOxide Semiconductor (MOS) capacitor with a larger capacitance densitymay be used, thereby further reducing the chip area.

In addition, in the disclosure, the use of the operational amplifierwith relatively high power consumption is reduced effectively, therebyeffectively reducing circuit power consumption.

In a preferred embodiment of the temperature sensor provided in thepresent disclosure, the control module 5 is configured to generate atemperature detection signal μ according to

$\mu = {\frac{kU1}{{kU1} + {U2}} = \frac{kD}{{kD} + 1 - D}}$and output the temperature detection signal.

It can be seen from the above content that, those skilled in the art candirectly obtain the temperature according to the duty-cycle D of thecomparison result signal. In addition, parameter adjustment can beperformed on basis of the duty-cycle D, and a variable μ that is morelinear with temperature can be obtained by introducing the adjustmentparameter k,

$\mu = {\frac{kU1}{{kU1} + {U2}} = {\frac{kD}{{kD} + 1 - D} = \frac{kY}{{kY} + 1}}}$

Y=U1/U2. The selection criterion of the adjustment parameter k is tomake the temperature positively correlated coefficient of k·U1 and thetemperature negatively correlated coefficient of U2 completelycounteract with each other, so that k·U1+U2 does not change with thechange of temperature, in this way, the correlation between the obtainedvariable μ and temperature depends on U1, that is, the variable μ has agood positive correlation.

In a preferred embodiment of the temperature sensor provided in thepresent disclosure, the first voltage module includes a firstProportional to Absolute Temperature (PTAT) current source E1 and a biasresistor Rp connected in series. The first voltage U1 is a voltageacross two ends of the bias resistor Rp. The second voltage moduleincludes a second PTAT current source E2 and a bias bipolar junctiontransistor Qp connected in series. The second voltage U2 is abase-emitter voltage of the bias bipolar junction transistor Qp. Thetemperature correlated voltage generating circuit further includes aPTAT current generating circuit configured to provide a first PTATcurrent for the first PTAT current source E1 and provide a second PTATcurrent for the second PTAT current source E2.

In an embodiment, the base-emitter voltage Vbe of the transistor isnegatively correlated with temperature, while the difference value ΔVbebetween the base-emitter voltages of the transistors with differentsizes or different bias currents is positively correlated withtemperature. A PTAT current generating circuit based on the abovecharacteristic can generate a PTAT current, thereby providing the firstPTAT current for the first PTAT current source E1 to form the firstvoltage U1 on the bias resistor Rp. Generally, the first voltage may benoted as U1=n·ΔVbe. n depends on the circuit setting in the PTAT currentgenerating circuit and the resistance value of the bias resistor Rp.ΔVbe also depends on the circuit setting in the PTAT current generatingcircuit. In addition, the base-emitter voltage of the bias bipolarjunction transistor Qp may be used to provide the second voltage U2=Vbe.

Referring to FIGS. 3, FIG. 3 is a circuit structural diagram of atemperature sensor according to an embodiment of the present disclosure.

As a preferred embodiment, in the temperature sensor shown in FIG. 3,the first PTAT current source E1 is connected with a first end of thebias resistor Rp and the second end of the first switch K1, and a secondend of the bias resistor Rp is connected to ground. The second PTATcurrent source E2 is connected with an emitter of the bias bipolarjunction transistor Qp and the second end of the second switch K2, and abase and a collector of the bias bipolar junction transistor Qp areconnected to ground.

Specifically, as shown in FIG. 3, in this embodiment, the first PTATcurrent source E1, the second PTAT current source E2, and the chargingcurrent source are three different current sources. The first PTATcurrent source E1 is configured to output the first voltage U1, thesecond PTAT current source E2 is configured to output the second voltageU2, and the charging current source is configured to charge the chargingcapacitor C.

Referring to FIG. 4, FIG. 4 is a circuit structural diagram of atemperature sensor according to another embodiment of the presentdisclosure.

As a preferred embodiment, in the temperature sensor shown in FIG. 4,the first PTAT current source E1 is connected with the first end of thefirst switch K1, a first end of the bias resistor Rp is connected withthe second end of the first switch K1, and a second end of the biasresistor Rp is connected to ground. The second PTAT current source E2 isconnected with the first end of the second switch K2, an emitter of thebias bipolar junction transistor Qp is connected with the second end ofthe second switch K2, and a base and a collector of the bias bipolarjunction transistor Qp is connected to ground. The charging currentsource includes a first charging current source and a second chargingcurrent source. The first PTAT current source E1 serves as the firstcharging current source to charge the charging capacitor C when thethird switch K3 is turned on, the second PTAT current source E2 servesas the second charging current source to charge the charging capacitor Cwhen the fourth switch K4 is turned on. The first PTAT current is equalto the second PTAT current.

As shown in FIG. 4, in this embodiment, compared with the embodimentshown in FIG. 3, the reuse of the current source can be realized byadjusting specific connection positions of the first switch K1 and thesecond switch K2. That is, the first PTAT current source E1 is reused asthe charging current source in the second phase (the second PTAT currentsource E2 is configured to output the second voltage U2 in the secondphase), and the second PTAT current source E2 is reused as the chargingcurrent source in the first phase (the first PTAT current source E1 isconfigured to output the first voltage U1 in the first phase).

The embodiment shown in FIG. 4 differs from the embodiment shown in FIG.3 in that, since it is needed to ensure that the duty-cycle-modulatedoutput of the comparator is only determined by the first voltage U1 andthe second voltage U2, it is necessary to ensure that the chargingcurrents in the two phases are the same, therefore, in the modulationcircuit shown in FIG. 4, the current I1 of the first PTAT current sourceE1 and the current I2 of the second PTAT current source E2 needs to beequal, which may be achieved based on a current mirror.

It should also be noted that, in both the embodiment shown in FIG. 3 andthe embodiment shown in FIG. 4, generally, the first voltage U1 and thesecond voltage U2 may be numerically close to each other to optimize thecircuit design. The first voltage U1, i.e. n·ΔVbe, can be adjusted byadjusting the magnitude of the resistance of the bias resistor Rp and/orthe magnitude of the total current flowing through the bias resistor Rp.

Referring to FIGS. 5, FIG. 5 is a circuit structural diagram of atemperature sensor according to another embodiment of the presentdisclosure.

As a preferred embodiment, on basis of FIG. 4, in the temperature sensorprovided in FIG. 5, the first voltage module further includes a thirdPTAT current source E3, and the third PTAT current source E3 isconnected with the second end of the first switch K1.

As shown in FIG. 5, the third PTAT current source E3 is introduced inthe embodiment, which achieves the purpose of increasing the totalcurrent flowing through the bias resistor Rp, and ensures that thecharging current of the charging capacitor C in two phases are the same.

Preferably, the PTAT current generating circuit may provide the thirdPTAT current to the third PTAT current source E3 based on the currentmirror. Those skilled in the art can select and set the magnitude of thethird PTAT current I3 and the magnitude of the resistance of the biasresistor Rp according to the actual requirement, which is not limited inthis disclosure. For example, it may be set as I3=4·I1=4·I2=4·I. Thecurrent I1 and the current I2 are two mirror currents outputted from thecurrent mirror, and the current I3 can be obtained by connecting thefour mirror currents outputted from the current mirror in parallel, I isthe current of each mirror current.

In addition, as a preferred embodiment, on basis of FIG. 4, in thetemperature sensor provided in FIG. 5, the second voltage module furtherincludes a compensation bipolar junction transistor Qb and acompensation current source E4. The compensation current source E4 isconnected with an emitter of the compensation bipolar junctiontransistor Qb. A collector of the compensation bipolar junctiontransistor Qb is connected to ground, a base of the compensation bipolarjunction transistor Qb is connected with the emitter of the bias bipolarjunction transistor Qp. The compensation bipolar junction transistor Qbis configured to perform gain compensation on the bias bipolar junctiontransistor Qp.

In an embodiment, as shown in FIG. 5, the actual gain of the biasbipolar junction transistor Qp may be compensated to increase byintroducing the compensation bipolar junction transistor Qb. Thecompensation current I4 of the compensation current source E4 ispreferably set to be equal to the current I2 of the second PTAT currentsource E2 (a deviation is acceptable), that is, I4=I2=4·I, the PTATcurrent generating circuit may also be preferably configured to providea compensation current I4 to the compensation current source E4 based onthe current mirror.

Referring to FIG. 6, FIG. 6 is a circuit structural diagram of atemperature sensor according to another specific embodiment of thepresent disclosure.

In a preferred embodiment shown in FIG. 6, the PTAT current generatingcircuit includes a current mirror module, an operational amplifier A, afirst resistor R1, a first predetermined number of first transistors Q1,and a second predetermined number of second transistors Q2.

A first end of the first resistor R1 is connected with a non-invertinginput end of the operational amplifier A and is configured to receive afirst mirror current outputted from the current mirror module; a secondend of the first resistor R1 is connected with an emitter of each of thefirst transistors Q1.

An emitter of each of the second transistors Q2 is connected with aninverting input end of the operational amplifier A and is configured toreceive a second mirror current outputted from the current mirrormodule. A base and a collector of each of the first transistors Q1 areconnected to ground, a base and a collector of each of the secondtransistors Q2 are connected to ground. The current mirror module isconfigured to provide the first PTAT current and the second PTATcurrent.

It should be noted that the “first” and “second” in the “firsttransistor” and the “second transistor” used herein are aimed todistinguish the transistors at different connection positions, ratherthan referring to one specific transistor. The “first transistor” refersto a transistor whose emitter is connected to the first resistor R1, andthe “second transistor” refers to a transistor whose emitter isconnected to the inverting input end of the operational amplifier A.

As described above, the difference value between the base-emittervoltages of the transistor in different circuit states is positivelycorrelated with temperature. The difference value ΔVbe may be realizedby different numbers of transistors with the same type or by the sizeareas of transistors with different types. For the purpose of improvingthe accuracy, as shown in FIG. 6, the first transistor Q1 and the secondtransistor Q2 having the same size, i.e., the same type, may beselected, and the first predetermined number of the first transistors Q1is set to be different from the second predetermined number of thesecond transistors Q2.

A person skilled in the art may select and set the first predeterminednumber and the second predetermined number according to actualapplication situations. For example, the ratio of the firstpredetermined number to the second predetermined number may be 8:1.

In a preferred embodiment shown in FIG. 6, the comparison module 1further includes a first chopper T1 configured to chop an input signalof the comparator G, and a second chopper T2 configured to chop anoutput signal of the comparator G. The PTAT current generating circuitfurther includes a third chopper T3 configured to chop an input signalof the operational amplifier A, and a fourth chopper T4 configured tochop an output signal of the operational amplifier. The control module 5is further configured to generate a chopping control clock signalaccording to the comparison result signal and output the choppingcontrol clock signal to the first chopper T1, the second chopper T2, thethird chopper T3 and the fourth chopper T4.

As described above, the technical effect of the present disclosure isnot affected when replacing the connection position of the non-invertinginput end and the inverting input end of the comparator G and adjustingaccordingly the control signal of the switch module 4. Therefore, inorder to eliminate the difference caused by different device structuresand further improve the accuracy of the detection result, thetemperature sensor provided in the present disclosure may furtherperform a chopping process on the signal related to the comparator G.That is, according to the chopper control clock signal, the connectionposition of the non-inverting input end and the inverting input end ofthe comparator G are alternately replaced through the first chopper T1,and the connection position of the output end of the Φ signal and theoutput end of the Φ signal are alternately replaced through the secondchopper T2. As for the operational amplifier A, the specific situationis similar to the comparator G, and is not described here.

In a preferred embodiment shown in FIG. 6, the PTAT current generatingcircuit further includes a second switching switch group connected withthe current mirror module and a first switching switch group. The secondend of the first resistor R1 is connected with the emitters of the firsttransistors Q1 via the first switching switch group. The inverting inputend of the operational amplifier A is connected with the emitters of thesecond transistors Q2 via the first switching switch group. The controlmodule 5 is further configured to generate a dynamic element matching(DEM) control clock signal according to the comparison result signal andoutput the DEM control clock signal to the first switching switch groupand the second switching switch group, to perform dynamic elementmatching control on the first transistors Q1, the second transistors Q2and the current mirror module.

In a CMOS circuit design with a high accuracy, the mismatch betweenelements is an important reason for generating errors and affectingaccuracy. Considering that the element mismatch between the firsttransistor Q1 and the second transistor Q2 may cause the gain error inthe current mirror module and the offset voltage of the operationalamplifier A, in order to restrain the error and improve the detectionaccuracy, and the dynamic element matching (DEM) control may beintroduced in the present embodiment.

As described above, the first transistors Q1 has the same type and sizeas the second transistors Q2, the number of the first transistors is thefirst predetermined number, and the number of the second transistors isthe second predetermined number. In this embodiment, the first switchingswitch group including multiple switching switches may be arranged inthe PTAT current generating circuit, the number of the switchingswitches is a sum of the first predetermined number and the secondpredetermined number. The emitter of each of the first transistors Q1 orthe second transistors Q2 are connected to a movable end of oneswitching switch, and two fixed ends of each switching switch areconnected with a second end of the first resistor R1 and the invertinginput end of the operational amplifier A, respectively. With the controlof the control module 5, the movable end of each switching switch can beconnected to one of two fixed ends of the switching switch. Thereby, thecontrol module 5 can timely control the switching switch to perform theswitching operation and replace the first transistor and the secondtransistor according to the DEM control clock signal. Of course, thenumber of the first transistors Q1 and the number of the secondtransistors Q2 are always needed to be constant during the dynamicelement matching control process.

Similarly, in order to restrain the gain error in the current mirrormodule, the dynamic element matching control may also be performed oneach mirror current output of the current mirror module in thisembodiment. Specifically, the PTAT current generating circuit requirestwo mirror currents. In the case of I3=4·I1=4·I2=4·I, each of I1 and I2requires one mirror current, and I3 requires four mirror currents.Therefore, eight mirror currents are needed in total. Therefore, dynamicelement matching control can be performed for each group of eightperiods of the comparison result signal Φ.

For the specific implementation of the temperature sensor provided inthe present disclosure, the modulation circuit for voltage to duty-cycleconversion described above may be referred, which is not describedherein.

Various embodiments of the present disclosure are described in aprogressive manner, and each embodiment lays emphasis on differencesfrom other embodiments. For the same or similar parts between theembodiments, one may refer to description of other embodiments.

It should be further noted that the relationship terminologies such as“first”, “second” and the like are only used herein to distinguish oneentity or operation from another, rather than to necessitate or implythat the actual relationship or order exists between the entities oroperations. In addition, terms “comprising”, “including”, or any othervariant thereof are intended to encompass a non-exclusive inclusion suchthat processes, articles, or devices that include a series of elementsinclude not only those elements but also those that are not explicitlylisted or other elements that are inherent to such processes, articles,or devices. Without limiting more, the elements defined by the statement“comprising one . . . ” do not exclude that there are other identicalelements in the process, article, or device that includes said elements.

The technical solution according to the present disclosure is describedin detail herein. Although specific embodiments are described forexplaining the principle and implementation of the present disclosure,the description of the embodiments is only for facilitatingunderstanding core idea of the present disclosure. It should be notedthat, for those skilled in the art, a few of modifications andimprovements may be made to the present disclosure without departingfrom the principle of the present disclosure, and these modificationsand improvements also fall into the scope of protection of the presentdisclosure.

The invention claimed is:
 1. A modulation circuit for voltage to duty-cycle conversion, comprising: a comparison module comprising a comparator; a charging module comprising a charging capacitor and a charging current source; a grounding reset module; a switch module comprising a first switch, a second switch, a third switch and a fourth switch; and a control module; wherein a first input end of the comparator is connected with a first end of the first switch, a second end of the first switch is supplied with a first voltage; a second input end of the comparator is connected with a first end of the second switch, a second end of the second switch is supplied with a second voltage; an output end of the comparator serves as an output end of the modulation circuit, the output end of the comparator is configured to output a comparison result signal; a charging end of the charging capacitor is connected with the charging current source and the grounding reset module, the charging end of the charging capacitor is connected with the first input end of the comparator via the third switch, and the charging end of the charging capacitor is connected with the second input end of the comparator via the fourth switch; and the control module is configured to, when the comparison result signal flips over, control the grounding reset module to operate to make the charging capacitor be connected to ground and be reset, and switch an on-off state of a first switch group and an on-off state of a second switch group, wherein the first switch group comprises the first switch and the fourth switch, and the second switch group comprises the second switch and the third switch.
 2. The modulation circuit according to claim 1, wherein the first input end of the comparator is a non-inverting input end, and the second input end of the comparator is an inverting input end; and the control module is configured to control the on-off state of the first switch group according to the comparison result signal, and control the on-off state of the second switch group according to an inverting signal of the comparison result signal.
 3. A temperature sensor, comprising a temperature correlated voltage generating circuit and the modulation circuit for voltage to duty-cycle conversion according to claim 1, wherein the temperature correlated voltage generating circuit comprises: a first voltage module configured to output the first voltage; and a second voltage module configured to output the second voltage, wherein the first voltage is positively correlated with temperature, the second voltage is negatively correlated with temperature; and the control module is further configured to generate a temperature detection signal according to a duty-cycle of the comparison result signal and output the temperature detection signal.
 4. The temperature sensor according to claim 3, wherein the control module is configured to generate a temperature detection signal μ according to $\mu = \frac{kD}{{kD} + 1 - D}$ and output the temperature detection signal; wherein D is the duty-cycle of the comparison result signal, and k is an adjustment parameter.
 5. The temperature sensor according to claim 3, wherein the first voltage module comprises a first Proportional to Absolute Temperature (PTAT) current source and a bias resistor connected in series, wherein the first voltage is a voltage across two ends of the bias resistor; the second voltage module comprises a second PTAT current source and a bias bipolar junction transistor connected in series, wherein the second voltage is a base-emitter voltage of the bias bipolar junction transistor; and the temperature correlated voltage generating circuit further comprises a PTAT current generating circuit configured to provide a first PTAT current for the first PTAT current source and provide a second PTAT current for the second PTAT current source.
 6. The temperature sensor according to claim 5, wherein the first PTAT current source is connected with a first end of the bias resistor and the second end of the first switch, and a second end of the bias resistor is connected to ground; and the second PTAT current source is connected with an emitter of the bias bipolar junction transistor and the second end of the second switch, and a base and a collector of the bias bipolar junction transistor are connected to ground.
 7. The temperature sensor according to claim 5, wherein the first PTAT current source is connected with the first end of the first switch, a first end of the bias resistor is connected with the second end of the first switch, and a second end of the bias resistor is connected to ground; the second PTAT current source is connected with the first end of the second switch, an emitter of the bias bipolar junction transistor is connected with the second end of the second switch, and a base and a collector of the bias bipolar junction transistor is connected to ground; and the charging current source comprises a first charging current source and a second charging current source, and the first PTAT current source serves as the first charging current source to charge the charging capacitor when the third switch is turned on, the second PTAT current source serves as the second charging current source to charge the charging capacitor when the fourth switch is turned on, wherein the first PTAT current is equal to the second PTAT current.
 8. The temperature sensor according to claim 7, wherein the first voltage module further comprises a third PTAT current source connected with the second end of the first switch.
 9. The temperature sensor according to claim 7, wherein the second voltage module further comprises a compensation bipolar junction transistor and a compensation current source; wherein the compensation current source is connected with an emitter of the compensation bipolar junction transistor; a collector of the compensation bipolar junction transistor is connected to ground, a base of the compensation bipolar junction transistor is connected with the emitter of the bias bipolar junction transistor, the compensation bipolar junction transistor is configured to perform gain compensation on the bias bipolar junction transistor.
 10. The temperature sensor according to claim 5, wherein the PTAT current generating circuit comprises a current mirror module, an operational amplifier, a first resistor, a first predetermined number of first transistors, and a second predetermined number of second transistors; a first end of the first resistor is connected with a non-inverting input end of the operational amplifier and is configured to receive a first mirror current outputted from the current mirror module; a second end of the first resistor is connected with an emitter of each of the first transistors; and an emitter of each of the second transistors is connected with an inverting input end of the operational amplifier and is configured to receive a second mirror current outputted from the current mirror module; a base and a collector of each of the first transistors are connected to ground, a base and a collector of each of the second transistors are connected to ground; the current mirror module is configured to provide the first PTAT current and the second PTAT current.
 11. The temperature sensor according to claim 10, wherein the comparison module further comprises a first chopper configured to chop an input signal of the comparator, and a second chopper configured to chop an output signal of the comparator; the PTAT current generating circuit further comprises a third chopper configured to chop an input signal of the operational amplifier, and a fourth chopper configured to chop an output signal of the operational amplifier; and the control module is further configured to generate a chopping control clock signal according to the comparison result signal and output the chopping control clock signal to the first chopper, the second chopper, the third chopper and the fourth chopper.
 12. The temperature sensor according to claim 11, wherein the PTAT current generating circuit further comprises a second switching switch group connected with the current mirror module and a first switching switch group; the second end of the first resistor is connected with the emitters of the first transistors via the first switching switch group; the inverting input end of the operational amplifier is connected with the emitters of the second transistors via the first switching switch group; and the control module is further configured to generate a dynamic element matching (DEM) control clock signal according to the comparison result signal and output the DEM control clock signal to the first switching switch group and the second switching switch group, to perform dynamic element matching control on the first transistors, the second transistors and the current mirror module. 